// ****************************************************************************** 
// Copyright     :  Copyright (C) 2018, Hisilicon Technologies Co. Ltd.
// File name     :  prf_c_union_define.h
// Project line  :  K3
// Department    :  K3
// Author        :  Huawei
// Version       :  V100
// Date          :  2015/4/10
// Description   :  HiVcodecV100 VDEC
// Others        :  Generated automatically by nManager V4.2 
// History       :  Huawei 2018/04/10 10:02:40 Create file
// ******************************************************************************

#ifndef __PRF_C_UNION_DEFINE_H__
#define __PRF_C_UNION_DEFINE_H__

/* Define the union U_PRF_INFO */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_0          : 15  ; /* [31:17] */
        unsigned int    frst_data_type : 1  ; /* [16] */
        unsigned int    frst_part_mod  : 2  ; /* [15:14] */
        unsigned int    mpeg4_rnd      : 1  ; /* [13] */
        unsigned int    frst_mvx       : 3  ; /* [12:10] */
        unsigned int    frst_mvy       : 3  ; /* [9:7] */
        unsigned int    frst_cmd[4:3]  : 2  ; /* [6:5] */
        unsigned int    flt_mode_mpeg4 : 1  ; /* [4] */
        unsigned int    prf_protocol   : 4  ; /* [3:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PRF_INFO;

/* Define the union U_PRF_STATE */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_1   : 19  ; /* [31:13] */
        unsigned int    cur_vst : 6  ; /* [12:7] */
        unsigned int    cur_hst : 7  ; /* [6:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PRF_STATE;

/* Define the union U_PRF_IBUF_ST */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_2                  : 8  ; /* [31:24] */
        unsigned int    ibuf_2bit_cmd_cnt[7:0] : 8  ; /* [23:16] */
        unsigned int    ibuf_cmd_cnt[7:0]      : 8  ; /* [15:8] */
        unsigned int    6'd0                   : 6  ; /* [7:2] */
        unsigned int    prf2prc_2bit_wac       : 1  ; /* [1] */
        unsigned int    prf2prc_wac            : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PRF_IBUF_ST;


//==============================================================================
/* Define the global struct */
typedef struct
{
    volatile U_PRF_INFO    PRF_INFO    ; /* 0 */
    volatile U_PRF_STATE   PRF_STATE   ; /* 4 */
    volatile U_PRF_IBUF_ST PRF_IBUF_ST ; /* 8 */

} S_prf_REGS_TYPE;

/* Declare the struct pointor of the module prf */
extern volatile S_prf_REGS_TYPE *gopprfAllReg;

/* Declare the functions that set the member value */
int iSetPRF_INFO_frst_data_type(unsigned int ufrst_data_type);
int iSetPRF_INFO_frst_part_mod(unsigned int ufrst_part_mod);
int iSetPRF_INFO_mpeg4_rnd(unsigned int umpeg4_rnd);
int iSetPRF_INFO_frst_mvx(unsigned int ufrst_mvx);
int iSetPRF_INFO_frst_mvy(unsigned int ufrst_mvy);
int iSetPRF_INFO_frst_cmd[4:3](unsigned int ufrst_cmd[4:3]);
int iSetPRF_INFO_flt_mode_mpeg4(unsigned int uflt_mode_mpeg4);
int iSetPRF_INFO_prf_protocol(unsigned int uprf_protocol);
int iSetPRF_STATE_cur_vst(unsigned int ucur_vst);
int iSetPRF_STATE_cur_hst(unsigned int ucur_hst);
int iSetPRF_IBUF_ST_ibuf_2bit_cmd_cnt[7:0](unsigned int uibuf_2bit_cmd_cnt[7:0]);
int iSetPRF_IBUF_ST_ibuf_cmd_cnt[7:0](unsigned int uibuf_cmd_cnt[7:0]);
int iSetPRF_IBUF_ST_6'd0(unsigned int u6'd0);
int iSetPRF_IBUF_ST_prf2prc_2bit_wac(unsigned int uprf2prc_2bit_wac);
int iSetPRF_IBUF_ST_prf2prc_wac(unsigned int uprf2prc_wac);

#endif // __PRF_C_UNION_DEFINE_H__
